#include <fermat/common/shared_library.h>
#include <fermat/common/cmdline.h>
#include <string>

typedef void (*HelloFunc)();
int main(int argc, char** argv)
{
	fermat::CmdParser p;
	p.add<std::string>("lib", 'l', "lib path", true, "");
    p.parse_check(argc, argv);
    std::string libpath =  p.get<std::string>("lib");
    fermat::SharedLibrary lib;
    lib.load(libpath);
    HelloFunc func = (HelloFunc) lib.getSymbol("hello");
    func();
    lib.unload();
    return 0;

}
